/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AboutFrame.java
 *
 * Created on 13.11.2009, 19:04:08
 */

package iddsgui;

import Main.Parameters;
import javax.swing.ImageIcon;

/**
 *
 * @author zem
 */
public class AboutFrame extends javax.swing.JFrame {
    AboutFrame instance;
    /** Creates new form AboutFrame */
    public AboutFrame() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        ImageIcon IDDSicon = createImageIcon("img/idds.png",null);
        jLabel1 = new javax.swing.JLabel(IDDSicon);
        NameLabel = new javax.swing.JLabel();
        DescriptionLabel = new javax.swing.JLabel();
        VersionLabel = new javax.swing.JLabel();
        AuthorLabel = new javax.swing.JLabel();
        HomepageLabel = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        NameLabel.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        NameLabel.setText(Parameters.GUI_AboutFrame_NameLabel);

        DescriptionLabel.setText(Parameters.GUI_AboutFrame_DescriptionLabel);

        VersionLabel.setText(Parameters.GUI_AboutFrame_VersionLabel);

        AuthorLabel.setText(Parameters.GUI_AboutFrame_AuthorLabel);

        HomepageLabel.setText(Parameters.GUI_AboutFrame_HomepageLabel);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(HomepageLabel)
                        .addContainerGap())
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(AuthorLabel)
                            .addContainerGap())
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(VersionLabel)
                                .addContainerGap())
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(DescriptionLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 363, Short.MAX_VALUE)
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(NameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 351, Short.MAX_VALUE)
                                    .addContainerGap()))))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addGap(12, 12, 12)
                .addComponent(NameLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(DescriptionLabel)
                .addGap(99, 99, 99)
                .addComponent(VersionLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(AuthorLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(HomepageLabel)
                .addGap(42, 42, 42))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public void main() {

        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                instance=new AboutFrame();
                instance.setTitle(Parameters.GUI_AboutFrame_Title);
                instance.setVisible(true);
            }
        });
    }
/** Returns an ImageIcon, or null if the path was invalid. */
protected ImageIcon createImageIcon(String path,
                                           String description) {
    java.net.URL imgURL = getClass().getResource(path);
    if (imgURL != null) {
        return new ImageIcon(imgURL, description);
    } else {
        return null;
    }
}

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel AuthorLabel;
    private javax.swing.JLabel DescriptionLabel;
    private javax.swing.JLabel HomepageLabel;
    private javax.swing.JLabel NameLabel;
    private javax.swing.JLabel VersionLabel;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables

}
